package fregat.usb.application.context.arguments;

import org.apache.commons.cli.*;

import fregat.application.context.arguments.IApplicationArguments;



public class ApplicationArguments implements IApplicationArguments {
	CommandLine cmd;

	public ApplicationArguments (String []args) throws ParseException {
		Options options = new Options();
		options.addOption("c", "config", true, "path to configuration file");
		CommandLineParser parser = new PosixParser();
		cmd = parser.parse( options, args);
	}

	public Object findOption(char key) {
		return cmd.getOptionValue(key);
	}
	
	public Object findOption(String key) {
		return cmd.getOptionValue(key);
	}	
}
